package com.xxxx.config;

import com.xxxx.dao.impl.BookDaoImpl;
import com.xxxx.service.impl.BookServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * Created By ShaoXikai on 2022/7/20
 */
@Configuration
@PropertySource("db.properties")
public class BeanConfig {

    @Bean("bookDao")
    public BookDaoImpl getBookDaoBean() {
        return new BookDaoImpl();
    }

    @Bean("bookService")
    public BookServiceImpl getBookServiceBean() {
        return new BookServiceImpl();
    }

}
